package com.hsjk.szwj.module.train.convert;

import com.hsjk.szwj.framework.common.pojo.PageResult;
import com.hsjk.szwj.module.train.api.dto.ProductSkuBindDTO;
import com.hsjk.szwj.module.train.api.dto.ProductSkuDTO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminCreateCourseReqVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminCreateOrUpdateSkuBindReqVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminCreateProductSkuReqVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminCreateProductSpuReqVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminProductSkuBindListRespVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminProductSkuDetailRespVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminProductSkuPageRespVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminProductSpuDetailRespVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminProductSpuPageRespVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminUpdateCourseReqVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminUpdateProductSkuReqVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminUpdateProductSpuReqVO;
import com.hsjk.szwj.module.train.controller.app.vo.product.CategoryListRespVO;
import com.hsjk.szwj.module.train.controller.app.vo.product.SkuBindListRespVO;
import com.hsjk.szwj.module.train.controller.app.vo.product.SkuDetailRespVO;
import com.hsjk.szwj.module.train.controller.app.vo.product.SkuListRespVO;
import com.hsjk.szwj.module.train.controller.app.vo.product.SpuDetailRespVO;
import com.hsjk.szwj.module.train.controller.app.vo.product.SpuListRespVO;
import com.hsjk.szwj.module.train.dal.dataobject.product.ProductCategoryDO;
import com.hsjk.szwj.module.train.dal.dataobject.product.ProductSkuBindDO;
import com.hsjk.szwj.module.train.dal.dataobject.product.ProductSkuDO;
import com.hsjk.szwj.module.train.dal.dataobject.product.ProductSpuDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author ec50n9
 */
@Mapper
public interface ProductConvert {

    ProductConvert INSTANCE = Mappers.getMapper(ProductConvert.class);

    SkuDetailRespVO convertSku(ProductSkuDO productSkuDO);

    List<SkuListRespVO> convertSku(List<ProductSkuDO> productSkuDOList);

    List<SpuListRespVO> convertSpu(List<ProductSpuDO> productSpuDO);

    SpuDetailRespVO convertSpu(ProductSpuDO productSpuDO);

    List<CategoryListRespVO> convertCategory(List<ProductCategoryDO> productCategoryDO);

    List<SkuBindListRespVO> convertSkuBind(List<ProductSkuBindDO> productSkuBindDOList);

    List<ProductSkuBindDTO> convertProductSkuBindList(List<ProductSkuBindDO> bindDOList);

    PageResult<AdminProductSpuPageRespVO> convertAdminProductSpuPageRespVO(PageResult<ProductSpuDO> productSpuDOPageResult);

    PageResult<AdminProductSkuPageRespVO> convertAdminProductSkuPageRespVO(PageResult<ProductSkuDO> productSkuDOPageResult);

    AdminProductSpuDetailRespVO convertAdminProductSpuDetailRespVO(ProductSpuDO spuDO);

    List<AdminProductSkuBindListRespVO> convertAdminProductSkuBindListRespVO(List<ProductSkuBindDO> skuBindDOList);

    AdminProductSkuDetailRespVO convert(ProductSkuDO productSkuDO);

    ProductSkuBindDO convertProductSkuBindDO(AdminCreateOrUpdateSkuBindReqVO reqVO);

    ProductSpuDO convertProductSpuDO(AdminCreateProductSpuReqVO reqVO);

    ProductSpuDO convertProductSpuDO(AdminUpdateProductSpuReqVO reqVO);

    ProductSpuDO convertProductSpuDO(AdminCreateCourseReqVO.SpuInfo reqVO);

    ProductSkuDO convertProductSkuDO(AdminCreateCourseReqVO.SkuInfo reqVO);

    ProductSkuDO convertProductSkuDO(AdminUpdateCourseReqVO.SkuInfo reqVO);

    ProductSkuDTO convertProductSkuDTO(ProductSkuDO productSkuDO);

    ProductSpuDO convertProductSpuDO(AdminUpdateCourseReqVO.SpuInfo reqVO);

    ProductSkuDO convertProductSkuDO(AdminCreateProductSkuReqVO reqVO);
    ProductSkuDO convertProductSkuDO(AdminUpdateProductSkuReqVO reqVO);
}
